// import { Canceler } from 'axios';
import { pget, postFileByFormData, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 获取供应商评级列表
export function getGraderecordList(query?: any) {
  return pget(`${modalApi.supplier}/graderecord/page`, query);
}

// 修改供应商评级
export function editGraderecord(data: any) {
  return ppostJson(`${modalApi.supplier}/graderecord/update`, data);
}

// 查看供应商评级详情
export function graderecordInfo(id: string) {
  return pget(`${modalApi.supplier}/graderecord/info/${id}`);
}
/** 获取历史评级记录 */
export function getFindHistoryListByDate(query?: any) {
  return pget(`${modalApi.supplier}/graderecord/findHistoryListByDate`, query);
}
/** 计算评分文件 */
export function importGraderecord(query?: any) {
  return postFileByFormData(
    `${modalApi.supplier}/graderecord/import/computeScore`,
    query,
  );
}